<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  <meta name="keywords" content="在线答题">
  <meta name="description" content="在线答题是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">
  <title>在线答题APP后台管理系统</title>
  <link rel="shortcut icon" href="favicon.ico">
  <link href="../Styles/css/bootstrap.min.css" rel="stylesheet">
  <link href="../Styles/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
  <link href="../Styles/css/animate.min.css" rel="stylesheet">
  <link href="../Styles/css/style.min.css" rel="stylesheet">
  <link href="../Styles/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
  <link href="../Styles/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
  <style>
    .right{
      text-align: right;
    }
  </style>
</head>

<body class="gray-bg" >
  <div class="wrapper wrapper-content animated fadeInRight" >
    <div class="row">
      <!-- <div class="col-sm-12">
          <div class="ibox-content"> -->
      <form class="form-horizontal m-t" id="EditForm">
        <div class="form-group">
          <label class="col-xs-2 right   control-label">姓名:</label>
          <div class="col-xs-10">
            <input id="ID" name="ID" class="form-control" type="hidden">
            <input id="Name" name="Name" class="form-control" type="text">
            <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请输入用户名且不能为空</span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-2 right  control-label">出生日期：</label>
          <div class="col-xs-10">
            <div class="input-group date">
              <input type="text" class="form-control" name="Birthday" id="Birthday">
              <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
            </div>
            <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请选择出生日期</span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-2  right control-label">电子邮件：</label>
          <div class="col-xs-10">
            <input id="Email" name="Email" class="form-control" type="email">
            <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请输入正确的电子邮件格式</span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-2 right control-label">备注：</label>
          <div class="col-xs-10">
            <textarea id="Remark" name="Remark" class="form-control" style="height:100px"></textarea>
          </div>
        </div>
      </form>
    </div>
  </div>
  <!-- </div>
    </div>
  </div> -->
  <script src="../Scripts/jquery.min.js"></script>
  <script src="../Scripts/bootstrap.min.js"></script>
  <script src="../Scripts/content.min.js"></script>
  <script src="../Scripts/plugins/validate/jquery.validate.min.js"></script>
  <script src="../Scripts/plugins/validate/messages_zh.min.js"></script>
  <script src="../Scripts/plugins/datapicker/bootstrap-datepicker.js"></script>
  <script>
    $(function () {
      $('#Birthday').datepicker({
        todayBtn: "linked",
        keyboardNavigation: !1,
        forceParse: !1,
        calendarWeeks: !0,
        autoclose: !0
      });

      $("#EditForm").validate({
        rules: { //验证规则
          Name: {
            required: true,
            maxlength: 20
          },          
          Email: {
            email: true
          }
        },
        messages: { //对应的提示
          Name: {
            required: "用户名必填",
            maxlength: "用户名最长20个字符(汉字)"
          },          
          Email: {
            emial: "电子邮件格式不正确"
          }
        }
      });
      var id = window.location.href.split('?')[1].split('=')[1];
      $.get(currentUrl+'User/'+id,function(data) {
          $("#ID").val(data.id);
          $("#Name").val(data.name);
          $("#Birthday").val(data.birthday);
          $("#Email").val(data.email);
          $("#Remark").val(data.remark);
      });
    });
  </script>
</body>

</html>